<?php foreach ($aryProductType as $key => $value) { ?>
<?php if (isset($aryProductByType[$key][0])) {?>
    <div class="box_main_all">
        <div class="box_in_top">
            <div class="box_bor_right">

                <div class="box_bor_left">
                    <div class="box_bor_center">
                        <div class="box_top_title">
                            <a href="/productInfo/<?php echo $key;?>/<?php echo $categoryId;?>/"><?php echo $value; ?></a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="box_in_center">
        <div class="bor_right">
            <div class="bor_left">
                <div class="no_bor_content">
                    
                    <?php foreach ($aryProductByType[$key] as $key => $product) {
                    ?>
                    <?php
                                $productHiglight = str_replace("\n", '<br>', $product['product_highlight']);
                                $productHiglight = str_replace("\r", '<br>', $productHiglight);
                                $productHiglight = str_replace("\"", '', $productHiglight);

                                $product_promotional = str_replace("\n", '<br>', $product['product_promotional']);
                                $product_promotional = str_replace("\r", '<br>', $product_promotional);
                                $product_promotional = str_replace("\"", '', $product_promotional);
                    ?>
                                <div class="div_item_cus"  onmouseout='UnTip()' onmouseover="Tip('<div class=\'div_tootip_content\'><div class=\'div_ttp_title\'><?php echo $product['product_title']; ?> - <span class=\'ttp_price\'> <?php echo number_format($product['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ</span></div><div class=\'div_ttp_pro_title\'>Khuyến mãi dành cho sản phẩm</div><div class=\'div_ttp_pro_content\'><?php echo $product_promotional;?></div><div class=\'div_fun_title\'>Tính năng nổi bật</div><div class=\'div_fun_content\'><?php echo $productHiglight; ?> </div></div>', WIDTH, 300, ABOVE, true)">
                                    <div class="div_item_image">
                                        <a >
                                            <img src="<?php echo $product['product_small_image']; ?>">
                                        </a>

                                    </div>
                                    <div class="div_item_text">
                                        <div class="div_item_title">
                                            <a href="/product/<?php echo $product['product_id'];?>/<?php echo $product['product_title_filter'];?>.html" ><?php echo $product['product_title'];?></a>
                                        </div>
                            <div class="div_item_price">
                                <span class="sp_price">
                                    <?php echo number_format($product['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ
                                </span>
                            </div>
                        </div>
                    </div>
                    <div style="text-align: center; text-align: -moz-center;">
                        <div style="border-bottom: solid 1px #e5e5e5; width: 90%;">
                        </div>
                    </div>
                    <?php } ?>
                        </div>
                    </div>
                </div>
            </div>

            <div class="box_in_bottom">
                <div class="bor_bot_right">
                    <div class="bor_bot_left">
                        <div class="bor_bot_center">
                            &nbsp;
                        </div>
                    </div>
                </div>
            </div>

        </div>
    <?php } ?>
<?php } ?>